import React, { FC, useContext, useEffect } from 'react';
import { View, Text, Image } from '@tarojs/components';
import { styled } from 'linaria/react';
import { useClassName } from '@/utils/index';
import { Button } from 'antd-mobile';
import { ArtistsSettledInContext } from '../ArtistsSettledInContext';
export interface IProps extends ICompProps {}
NotStationed.defaultProps = {} as Partial<IProps>;
function NotStationed(props: IProps) {
    const { className, style } = props;
    const localClassName = useClassName('NotStationed', className);
    const { setShowComponent } = useContext(ArtistsSettledInContext);
    const clickBtn = () => {
        console.log('点了申请');
        setShowComponent('ApplySettledIn');
    };

    return (
        <RootView className={localClassName} style={style}>
            <Image className="img" src={require('@/assets/images/Mine_ArtistsSettledIn.png')} mode="scaleToFill" />
            <Text className="text">您还没有入驻平台，请先申请入驻</Text>
            <Button shape="rounded" className="btn" onClick={clickBtn}>
                立即申请
            </Button>
        </RootView>
    );
}
export default React.memo(NotStationed as FC<IProps>);
const RootView = styled(View)`
    &.NotStationed {
        width: 100%;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        display: flex;
        flex-direction: column;
        align-items: center;
        .img {
            width: 360px;
            height: 270px;
        }
        .text {
            color: #808a9d;
            font-size: 28px;
        }
        .btn {
            margin-top: 48px;
            width: 300px;
            height: 90px;
            background-color: #ff8828;
            color: #fff;
            letter-spacing: 2px;
        }
    }
`;
